1. Field of the Invention
The present invention relates to a numerical controller and, in particular, to a numerical controller that has a function of preventing interference between a tool and a workpiece in a positioning command for moving a plurality of axes simultaneously.
2. Description of the Related Art
In a positioning command for moving a plurality of axes simultaneously, if respective axes do not move in synchronization as in a cutting command, a moving path does not become a straight line. With this, a tool and a workpiece may interfere with each other. An example of a tool and a workpiece interfering with each other will be described below with reference to FIG. 9.
In FIG. 9, in a case where, with a tool 2 positioned on a point A (current position), a command that is for positioning the tool 2 on a point B (commanded position) is executed, and the tool 2 is controlled to move in a straight line, the tool 2 moves along a path illustrated with a the solid arrow in FIG. 9. With this, the tool 2 and a workpiece 3 do not interfere with each other. However, in an actual case, synchronization of an X axis and a Z axis is not assured in a positioning command, and the X axis and the Z axis are driven simultaneously at respective speed thereof. In consequence, the tool 2 travels on a moving path illustrated with a dotted arrow in FIG. 9, and the tool 2 and the workpiece 3 interfere with each other. To prevent such a problem from occurring, a prior art technique has used linear interpolation positioning, which performs positioning along a path connecting a start point and an end point with a straight line, with a technique disclosed in Japanese Patent Application Laid-Open No. 08-076827, for example.
However, in order to move a plurality of axes along a path connecting a start point and an end point with a straight line with a technique disclosed in Japanese Patent Application Laid-Open No. 08-076827, for example, linear interpolation positioning has to be used, and fixed-time acceleration and deceleration also has to be used, in which all interpolated axes have the same acceleration speed (time constant).
FIGS. 10A and 10B are diagrams for comparing speed change in axes between a case where tool positioning control is performed with non-linear interpolation positioning (FIG. 10A) and a case where tool positioning control is performed with linear interpolation positioning (FIG. 10B).
As illustrated in FIG. 10A, in a case where positioning control is performed with non-linear interpolation positioning, an X axis and a Z axis are accelerated and decelerated based on time constants set for each axis (Tx for the X axis and Tz for the Z axis) and driven independently. By contrast, as illustrated in FIG. 10B, in a case where tool positioning control is performed with linear interpolation positioning with fixed-time acceleration and deceleration, the time constant Tz for the Z axis is matched with the time constant Tx for the X axis for acceleration and deceleration, and the X axis and the Z axis are driven in synchronization while control is performed so that a commanded speed (maximum speed) is not exceeded.
As described above, with linear interpolation positioning, the largest time constant among those of the interpolated axes has to be set to all the axes to be interpolated, and control has to be performed so that the speed of each axis does not exceed the commanded speed. For these reasons, compared with the case of using non-linear interpolation positioning, there is a problem that the cycle time tends to be longer.